import request from "@/utils/request";

// 查询检验项目列表
export function listInspectitem(query) {
  return request({
    url: "/mes/qc/inspectitem/list",
    method: "get",
    params: query,
  });
}

// 查询检验项目详细
export function getInspectitem(id) {
  return request({
    url: "/mes/qc/inspectitem/" + id,
    method: "get",
  });
}

// 新增检验项目
export function addInspectitem(data) {
  return request({
    url: "/mes/qc/inspectitem",
    method: "post",
    data: data,
  });
}

// 修改检验项目
export function updateInspectitem(data) {
  return request({
    url: "/mes/qc/inspectitem",
    method: "put",
    data: data,
  });
}

// 删除检验项目
export function delInspectitem(id) {
  return request({
    url: "/mes/qc/inspectitem/" + id,
    method: "delete",
  });
}
// export function getJdyInspectutem(query) {
//   return request({
//     url: "/mes/k3cloud/api/quality/syncInspectitemList",
//     method: "get",
//     params: query,
//   });
// }

export function getJdyInspectutem(query) {
  return request({
    url: "/sync/k3cloud/api/iQcQmInspectitemSync/iQcQmInspectitemSync",
    method: "get",
    params: query,
  });
}
